<template>
    <div>
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="姓名">
                <el-input
                    v-model="formInline.name"
                    placeholder="输入搜索的姓名"
                    clearable
                />
            </el-form-item>
            <el-form-item label="性别">
                <el-select
                    v-model="formInline.gender"
                    placeholder="输入搜索的性别"
                    clearable
                >
                    <el-option label="男" value="男" />
                    <el-option label="女" value="女" />
                </el-select>
            </el-form-item>
            <el-form-item label="年龄">
                <el-input
                    v-model="formInline.age"
                    placeholder="输入搜索的年龄"
                    clearable
                />
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script setup>
import { reactive,defineEmits } from 'vue'
const emits = defineEmits(["show"]);
const formInline = reactive({
  name: '',
  age: '',
  gender: '',
})
function onSubmit(){
    emits('show',1,5,{...formInline}); 
}
</script>
<style></style>
